package main

import (
	"../../UnSymmetric"
	"fmt"
)

func main1(){
	var u UnSymmetric.UnSymmetricInterface
	u=  new(UnSymmetric.ECC)
	u.MakeKey("C:\\Users\\Tsinghua-yincheng\\Documents\\oCam\\pub.pem",
		"C:\\Users\\Tsinghua-yincheng\\Documents\\oCam\\priv.pem")
	fmt.Println(u.GetPrivateKey())
	fmt.Println(u.GetPublicKey())



	datasign:="1234567890987654321"
	rtext,stext:=u.SignString(datasign)
	fmt.Println(u.VerificationSignString(datasign,rtext,stext))
	fmt.Println("-----------------------")
	fmt.Println(u.DecryptString(u.EncryptString(datasign)))
	fmt.Println(string(u.Decrypt(u.Encrypt([]byte(datasign)))))
	path:="C:\\Users\\Tsinghua-yincheng\\Desktop\\day12\\今日任务.txt"
	newpath:=u.EncryptFilePath(path)
	newdpath:=u.DecryptFilePath(newpath)
	fmt.Println(newdpath)

}

func main(){
	var u UnSymmetric.UnSymmetricInterface
	u=  new(UnSymmetric.ECC)
	u.MakeKey("C:\\Users\\Tsinghua-yincheng\\Documents\\oCam\\pub.pem",
		"C:\\Users\\Tsinghua-yincheng\\Documents\\oCam\\priv.pem")
	fmt.Println(u.GetPrivateKey())
	fmt.Println(u.GetPublicKey())



	datasign:="1234567890987654321"
	rtext,stext:=u.SignString(datasign)
	fmt.Println(len(rtext),len(stext))
	//rtext+="1"
	fmt.Println(u.VerificationSignString(datasign,rtext,stext))
}
